<div data-ng-controller="BookmarkController as vm" ng-init="vm.view()">
    <div class="mx-auto">
        <h2 class="text-center">BookmarkIT!</h2>
    </div>
    <div>
        <form class="justify-content-center" role="form" ng-submit="vm.update()">
            <div class="form-group">
                <label for="title" class="">Title</label>
                <input ng-model="vm.bookmark.title" type="text" class="form-control form-control-lg" id="title">
            </div>
            <div class="form-group">
                <label for="description" class="">Description</label>
                <textarea ng-model="vm.bookmark.description" type="text" class="form-control form-control-lg" id="description"></textarea>
            </div>
            <div class="form-group">
                <label for="url" class="">URL</label>
                <input ng-model="vm.bookmark.url" type="text" class="form-control form-control-lg" id="url" placeholder="Add URL...">
            </div>
            <button type="submit" class="btn btn-primary btn-lg mb-2"><strong>✓</strong></button>
        </form>
    </div>
    <div ng-show="vm.error" class="alert alert-danger alert-dismissible fade show" role="alert">
        {{ vm.error }}
        <button type="button" class="close" ng-click="vm.closeAlert()" aria-label="Close">
            <span aria-hidden="true">&times;</span>
        </button>
    </div>
</div>
